<?php
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'wsr.inc.php';
require_once MORIARTY_DIR . "simplegraph.class.php";
require_once MORIARTY_DIR . 'store.class.php';

class SparqlSource {
	var $store_uri;
	var $store;
	
	function __construct($store_uri=false) {
		if ( ! $store_uri ) $store_uri = 'http://api.talis.com/stores/bbc-backstage';
		$this->store_uri = $store_uri;
		$this->store = new Store($store_uri);
	}
	
	function do_query($query) {
		return  $this->store->get_sparql_service()->graph_to_simple_graph($query);
	}

}


?>